#!/usr/bin/python
# -*- coding: UTF-8 -*-

# app_demo
# 新增数据
from django.http import HttpResponse
from app_demo.models import appdemo, qaq


# 数据库操作
def add(request):
    qqq = appdemo(nameapp='man111')
    qqq.save()
    qq = qaq(gender='man')
    qq.save()
    # return HttpResponse("<p>数据添加成功！</p>")
    return HttpResponse(['<h1>app_demo----数据添加成功</h1>'.encode('utf-8'), ])


def xxx(request):
    q = appdemo.objects.get(id=1)
    q.delete()
    return HttpResponse('<p>删除成功</p>')
